/*
 * Copyright @ 2024 weili23
 * com.sky.controller.admin 16:28
 * All right reserved.
 */

package com.sky.controller.user;

import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @desc:
 * @author: weili23
 * @createTime: 2024/10/30 16:28
 * @version: v1.0
 */
@Api(tags = "用户端店铺相关接口")
@RestController("userShopController")
@RequestMapping("/user/shop")
public class ShopController {
    @Resource
    private StringRedisTemplate stringRedisTemplate;

    @ApiOperation("查询店铺状态")
    @GetMapping("/status")
    public Result<Integer> searchShopStatus(){
        String  shop_status = stringRedisTemplate.opsForValue().get("SHOP_STATUS");
        Integer status = Integer.parseInt(shop_status);
        return Result.success(status);
    }

}
